package com.jeespring.elasticsearch.controller;

import com.jeespring.elasticsearch.entity.Item;
import com.jeespring.elasticsearch.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description ItemController
 * @author 张朝阳
 * @date 2021/9/17 18:22
 */
@RestController
@RequestMapping("/item")
public class ItemController {

    @Autowired
    private ItemService itemService;

    @RequestMapping("/select")
    @ResponseBody
    public List<Item> select(){
        return itemService.select(new Item());
    }
}
